Determine if one value is greater than or equal to another with the >= operator. Notice the = comes after the >.
def greater_than_or_equal(val1, val2):
result = val1 >= val2
return result
Function Call | Return Value | |||
---|---|---|---|---|
greater_than_or_equal(6, 4) | → | |||
greater_than_or_equal(12, 12) | → | |||
greater_than_or_equal(8, 8) | → | |||
greater_than_or_equal(12, 24) | → | |||
greater_than_or_equal(7, 2) | → |
Experiment with this code on Gitpod.io